/*
 * @Descripttion: 
 * @version: 
 * @Author: HuangJunren
 * @Date: 2020-07-24 09:59:17
 * @LastEditors: HuangJunren
 * @LastEditTime: 2020-07-24 11:35:42
 */ 

#include "spdlog_interface.h"

int main() 
{
    spdlogger_ServerLogs4basic_open(SERVER_CMS_LOGS, M_SPDLOG_LOG_TYPE_basic_logger_st, M_spdlog_trace, M_spdlog_isnot_async, true);
    pSpdlogger _pSpdlogger = spdlogger_ServerLogs_get(SERVER_CMS_LOGS);
    spdlogger_printf4logger(M_spdlog_trace, "Test M_spdlog_trace!", NULL);
    spdlogger_printf(SERVER_CMS_LOGS, M_spdlog_debug, "Test M_spdlog_debug!");
    spdlogger_printf(SERVER_CMS_LOGS, M_spdlog_info, "Test M_spdlog_info!");
    spdlogger_printf(SERVER_CMS_LOGS, M_spdlog_err, "Test M_spdlog_err!");
    spdlogger_printf(SERVER_CMS_LOGS, M_spdlog_critical, "Test M_spdlog_critical!");

    spdlogger_ServerLogs4rotating_open(SERVER_MUSERVER_LOGS, M_SPDLOG_LOG_TYPE_rotating_logger_mt, M_spdlog_trace, M_spdlog_is_async, false, 1, 31);
    spdlogger_printf(SERVER_MUSERVER_LOGS, M_spdlog_trace, "Test M_spdlog_trace!");
    spdlogger_printf(SERVER_MUSERVER_LOGS, M_spdlog_debug, "Test M_spdlog_debug!");
    spdlogger_printf(SERVER_MUSERVER_LOGS, M_spdlog_info, "Test M_spdlog_info!");
    spdlogger_printf(SERVER_MUSERVER_LOGS, M_spdlog_err, "Test M_spdlog_err!");
    spdlogger_printf(SERVER_MUSERVER_LOGS, M_spdlog_critical, "Test M_spdlog_critical!");

    spdlogger_ServerLogs4daily_open(SERVER_SIP_LOGS, M_SPDLOG_LOG_TYPE_daily_logger_mt, M_spdlog_trace, M_spdlog_is_async, false, 1, 31);
    spdlogger_printf(SERVER_SIP_LOGS, M_spdlog_trace, "Test M_spdlog_trace!");
    spdlogger_printf(SERVER_SIP_LOGS, M_spdlog_debug, "Test M_spdlog_debug!");
    spdlogger_printf(SERVER_SIP_LOGS, M_spdlog_info, "Test M_spdlog_info!");
    spdlogger_printf(SERVER_SIP_LOGS, M_spdlog_err, "Test M_spdlog_err!");
    spdlogger_printf(SERVER_SIP_LOGS, M_spdlog_critical, "Test M_spdlog_critical!");

    // spdlogger_ServerLogs_drop(SERVER_CMS_LOGS);
    // pSpdlogger _pSpdlogger1 = spdlogger_ServerLogs_get(SERVER_CMS_LOGS);
    // spdlogger_printf4logger(M_spdlog_trace, "Test M_spdlog_trace!", _pSpdlogger1);
    
    // spdlogger_ServerLogs_dropall();
    // pSpdlogger _pSpdlogger2 = spdlogger_ServerLogs_get(SERVER_MUSERVER_LOGS);
    // spdlogger_printf4logger(M_spdlog_trace, "Test M_spdlog_trace!", _pSpdlogger2);

    return 0;
}